package com.aos.eap.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author HX
 * @date 2019/12/17
 * @desc
 */
public class SearchThingBean implements Serializable {

    /**
     * mtmhead : {"lotid":null,"batchid":"","starttime":"","dealcount":0}
     * mtmbodies : [{"mtmbodystructs":[{"title":"批次ID","value":"PD-CA-0023"},{"title":"使用次数","value":null},{"title":"物料类型","value":"Cap"}]},{"mtmbodystructs":[{"title":"批次ID","value":"S19X0573"},{"title":"卷轴ID","value":"B00I2O18156617200"},{"title":"发料时间","value":"2020/1/14 15:09:58"},{"title":"过期时间","value":"2020/1/15 9:20:36"},{"title":"剩余时间","value":"11530.15"},{"title":"物料类型","value":"CopperWire"}]}]
     */

    private MtmheadBean mtmhead;
    private List<MtmbodiesBean> mtmbodies;

    public MtmheadBean getMtmhead() {
        return mtmhead == null ? new MtmheadBean() : mtmhead;
    }

    public void setMtmhead(MtmheadBean mtmhead) {
        this.mtmhead = mtmhead;
    }

    public List<MtmbodiesBean> getMtmbodies() {
        if (mtmbodies == null) {
            return new ArrayList<>();
        }
        return mtmbodies;
    }

    public void setMtmbodies(List<MtmbodiesBean> mtmbodies) {
        this.mtmbodies = mtmbodies;
    }

    public static class MtmheadBean {

        private String lotid;
        private String batchid;
        private String starttime;
        private int dealcount;

        public String getLotid() {
            return lotid == null ? "" : lotid;
        }

        public void setLotid(String lotid) {
            this.lotid = lotid;
        }

        public String getBatchid() {
            return batchid == null ? "" : batchid;
        }

        public void setBatchid(String batchid) {
            this.batchid = batchid;
        }

        public String getStarttime() {
            return starttime == null ? "" : starttime;
        }

        public void setStarttime(String starttime) {
            this.starttime = starttime;
        }

        public int getDealcount() {
            return dealcount;
        }

        public void setDealcount(int dealcount) {
            this.dealcount = dealcount;
        }
    }

    public static class MtmbodiesBean {
        private List<MtmbodystructsBean> mtmbodystructs;

        public List<MtmbodystructsBean> getMtmbodystructs() {
            if (mtmbodystructs == null) {
                return new ArrayList<>();
            }
            return mtmbodystructs;
        }

        public void setMtmbodystructs(List<MtmbodystructsBean> mtmbodystructs) {
            this.mtmbodystructs = mtmbodystructs;
        }

        public static class MtmbodystructsBean {
            private String title;
            private String value;

            public String getTitle() {
                return title == null ? "" : title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public String getValue() {
                return value == null ? "" : value;
            }

            public void setValue(String value) {
                this.value = value;
            }

        }
    }
}
